package org.darcy.utils.pager;

import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 分页对象
 */
@Data
@Builder(toBuilder = true)
public class PagerModel2<T> implements Serializable {

	private static final long serialVersionUID = 1;

	/**
	 * 总记录数
	 */
	private long total;
	/**
	 * 每页的查询结果集
	 */
	private List<T> rows = new ArrayList<T>();

	public PagerModel2() {
	}

	public PagerModel2(long total, List<T> rows) {
		this.total = total;
		this.rows = rows;
	}

}
